package com.lx.controller;

import com.lx.service.MenuService;
import com.lx.vo.MenuVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("menu")
public class MenuController {
    @Autowired
    private MenuService menuService;

    @GetMapping("selectMenus")
    public List<MenuVo> selectMenus(){
        List<MenuVo> menuVos = menuService.showMenus();
        return menuVos;
    }
}
